Integrand size = 21, antiderivative size = 59 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {7 a^3 x}{2}+\frac {a^3 \text {arctanh}(\sin (c+d x))}{d}+\frac {3 a^3 \sin (c+d x)}{d}+\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d} \]
Time = 0.29 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.37 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {a^3 \left (14 d x-4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 \sin (c+d x)+\sin (2 (c+d x))\right )}{4 d} \]
(a^3*(14*d*x - 4*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 4*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 12*Sin[c + d*x] + Sin[2*(c + d*x)]))/(4*d)
Time = 0.26 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4278, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(c+d x) (a \sec (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4278 |
\(\displaystyle \int \left (a^3 \cos ^2(c+d x)+3 a^3 \cos (c+d x)+a^3 \sec (c+d x)+3 a^3\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^3 \text {arctanh}(\sin (c+d x))}{d}+\frac {3 a^3 \sin (c+d x)}{d}+\frac {a^3 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {7 a^3 x}{2}\) |
(7*a^3*x)/2 + (a^3*ArcTanh[Sin[c + d*x]])/d + (3*a^3*Sin[c + d*x])/d + (a^ 3*Cos[c + d*x]*Sin[c + d*x])/(2*d)
3.1.25.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[ExpandTrig[(a + b*csc[e + f*x])^m*(d*csc[e + f *x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && I GtQ[m, 0] && RationalQ[n]
Time = 0.46 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00
method | result | size |
parallelrisch | \(\frac {a^{3} \left (14 d x +12 \sin \left (d x +c \right )+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\sin \left (2 d x +2 c \right )\right )}{4 d}\) | \(59\) |
derivativedivides | \(\frac {a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} \left (d x +c \right )+3 a^{3} \sin \left (d x +c \right )+a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(71\) |
default | \(\frac {a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} \left (d x +c \right )+3 a^{3} \sin \left (d x +c \right )+a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(71\) |
risch | \(\frac {7 a^{3} x}{2}-\frac {3 i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a^{3} \sin \left (2 d x +2 c \right )}{4 d}\) | \(102\) |
norman | \(\frac {\frac {7 a^{3} x}{2}+\frac {7 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {9 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {3 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {5 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-7 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {7 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(187\) |
1/4*a^3*(14*d*x+12*sin(d*x+c)+4*ln(tan(1/2*d*x+1/2*c)+1)-4*ln(tan(1/2*d*x+ 1/2*c)-1)+sin(2*d*x+2*c))/d
Time = 0.28 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.10 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {7 \, a^{3} d x + a^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (a^{3} \cos \left (d x + c\right ) + 6 \, a^{3}\right )} \sin \left (d x + c\right )}{2 \, d} \]
1/2*(7*a^3*d*x + a^3*log(sin(d*x + c) + 1) - a^3*log(-sin(d*x + c) + 1) + (a^3*cos(d*x + c) + 6*a^3)*sin(d*x + c))/d
\[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=a^{3} \left (\int 3 \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cos ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \cos ^{2}{\left (c + d x \right )}\, dx\right ) \]
a**3*(Integral(3*cos(c + d*x)**2*sec(c + d*x), x) + Integral(3*cos(c + d*x )**2*sec(c + d*x)**2, x) + Integral(cos(c + d*x)**2*sec(c + d*x)**3, x) + Integral(cos(c + d*x)**2, x))
Time = 0.21 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.25 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} + 12 \, {\left (d x + c\right )} a^{3} + 2 \, a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{3} \sin \left (d x + c\right )}{4 \, d} \]
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*a^3 + 12*(d*x + c)*a^3 + 2*a^3*(log( sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 12*a^3*sin(d*x + c))/d
Time = 0.33 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.69 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {7 \, {\left (d x + c\right )} a^{3} + 2 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*(7*(d*x + c)*a^3 + 2*a^3*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 2*a^3*lo g(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(5*a^3*tan(1/2*d*x + 1/2*c)^3 + 7*a^3 *tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 13.28 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.49 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \, dx=\frac {7\,a^3\,x}{2}+\frac {2\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {5\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+7\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]